Carbon


SetGDevice

Header: Quickdraw.h Carbon status: Supported

Sets a GDevice structure as the current device.

void SetGDevice (
    GDHandle gd
);
Parameter descriptions
gd

A handle to a GDevice structure.

DISCUSSION

Your application won’t generally need to use this function, because when your application draws into a window on one or more screens, Color QuickDraw automatically switches GDevice structures as appropriate; and when your application needs to draw into an offscreen graphics world, it can use the SetGWorld function to set the graphics port as well as the GDevice structure for the offscreen environment. However, if your application uses the SetPort function instead of the SetGWorld function to set the graphics port to or from an offscreen graphics world, then your application must use SetGDevice in conjunction with SetPort.

A handle to the currently active device is kept in the global variable TheGDevice.

SPECIAL CONSIDERATIONS

The SetGDevice function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)